package com.tomecode.tools.maven.settings.model.xml;

import java.util.ArrayList;
import java.util.List;

/**
 * 
 * @author Frastia Tomas
 *
 */
public abstract class XmlElement {

	private static final long serialVersionUID = -4683252385829808123L;

	private final List<String> deleted = new ArrayList<String>();

	private final List<String> commented = new ArrayList<String>();

	public final boolean isCommented(String value) {
		return commented.contains(value);
	}

	public final boolean isDeleted(String value) {
		return deleted.contains(value);
	}

	public final void removeCommented(String value) {
		commented.remove(value);
	}

	public final void setCommented(String value) {
		if (!commented.contains(value)) {
			commented.add(value);
		}
	}

	public final void setDeleted(String value) {
		if (!deleted.contains(value)) {
			deleted.add(value);
		}
	}

	public final void removeDeleted(String value) {
		deleted.remove(value);
	}
}
